import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [{
    path: '/',
    name: 'Login',
    component: () => import('../views/Login.vue'),
}, {
    path: '/main',
    name: 'Main',
    component: () => import('../views/main/Main.vue'),
    children: [
        {
            name: 'EnvList',
            path: '/env/list',
            component: () => import('../views/environment/List.vue')
        }, {
            name: 'DatesetList',
            path: '/dataset/list',
            component: () => import('../views/dataset/List.vue')
        }, {
            name: 'Recognition',
            path: '/recognition',
            component: () => import('../views/recognition/Recognition.vue')
        }
    ]
}];

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
});

export default router
